package admission.ecnu.object;

import admission.ecnu.dao.teacherInfoDao;


public class OTeacherInfo {
	private String teacherId = null; 
	private String name = null;
	private String title = null;
	private String special = null;
	
	public OTeacherInfo(){}
	public OTeacherInfo(String name, String title, String special) {
		super();
		this.name = name;
		this.title = title;
		this.special = special;
	}
	
	@Override
	public String toString(){
		return "["+
				"id:"+this.getTeacherId()+","+
				"name:"+this.getName()+","+
				"title:"+this.getTitle()+","+
				"special"+this.getSpecial()+
				"]";
	}
	public String getTeacherId() {
		return teacherId;
	}
	public void setTeacherId(String teacherId) {
		this.teacherId = teacherId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getSpecial() {
		return special;
	}
	public void setSpecial(String special) {
		this.special = special;
	}
	public static OTeacherInfo getTeacherObjFromDbById(String teacher_id){
		return new teacherInfoDao().teacherSelectById(teacher_id);
	}
	public String getIdByName(String name){
		return new teacherInfoDao().getIdByName(name);
	}
}
